<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="description" content="">
  <meta name="author" content="Dashboard">
  <meta name="keyword" content="Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina">

  <title>手机商城-后台管理</title>
  <link rel="shortcut icon" type="image/x-icon" th:href="@{/img/timg.jpg}" media="screen"/>
  <!-- Bootstrap core CSS -->
  <link th:href="@{assets/css/bootstrap.css}" rel="stylesheet">
  <!--external css-->
  <link th:href="@{assets/font-awesome/css/font-awesome.css}" rel="stylesheet" />

  <!-- Custom styles for this template -->
  <link th:href="@{assets/css/style.css}" rel="stylesheet">
  <link th:href="@{assets/css/style-responsive.css}" rel="stylesheet">

  <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
  <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>

<body onload="getTime()">

<div class="container">

  <div id="showtime"></div>
  <div class="col-lg-4 col-lg-offset-4">
    <div class="lock-screen">
      <h2><a data-toggle="modal" href="#myModal"><i class="fa fa-lock"></i></a></h2>
      <p>解锁</p>

      <!-- Modal -->
      <div aria-hidden="true" aria-labelledby="myModalLabel" role="dialog" tabindex="-1" id="myModal" class="modal fade">
        <div class="modal-dialog">
          <div class="modal-content">
            <div class="modal-header">
              <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
              <h4 class="modal-title">欢迎回来</h4>
            </div>
            <div class="modal-body">
              <p class="centered"><img class="img-circle" width="80" th:src="@{assets/img/ui-sam.jpg}"></p>
              <input type="password" name="password" placeholder="密码" autocomplete="off" class="form-control placeholder-no-fix" id="password">
            </div>
            <div class="modal-footer centered">
              <button data-dismiss="modal" class="btn btn-theme04" type="button">取消</button>
              <button class="btn btn-theme03" type="button" id="submit">登录</button>
            </div>
          </div>
        </div>
      </div>
      <!-- modal -->


    </div><! --/lock-screen -->
  </div><!-- /col-lg-4 -->

</div><!-- /container -->


<!-- js placed at the end of the document so the pages load faster -->
<script th:src="@{assets/js/jquery.js}"></script>
<script th:src="@{assets/js/bootstrap.min.js}"></script>
<script th:src="@{assets/js/jquery-ui-1.9.2.custom.min.js}"></script>
<script th:src="@{assets/js/jquery.ui.touch-punch.min.js}"></script>
<script class="include" type="text/javascript" th:src="@{assets/js/jquery.dcjqaccordion.2.7.js}"></script>
<script th:src="@{assets/js/jquery.scrollTo.min.js}"></script>
<script th:src="@{assets/js/common-scripts.js}"></script>
<script type="text/javascript" th:src="@{assets/js/jquery.backstretch.min.js}"></script>
<script>
  $.backstretch("assets/img/login-bg.jpg", {speed: 500});
</script>

<script th:inline="javascript">
  let password = [[${session.admin.getuPassword()}]];
  $("#submit").click(function () {
    if (password == $("#password").val()){
      window.location.href = "/management-index";
    }
  })
  function getTime()
  {
    var today=new Date();
    var h=today.getHours();
    var m=today.getMinutes();
    var s=today.getSeconds();
    // add a zero in front of numbers<10
    m=checkTime(m);
    s=checkTime(s);
    document.getElementById('showtime').innerHTML=h+":"+m+":"+s;
    t=setTimeout(function(){getTime()},500);
  }

  function checkTime(i)
  {
    if (i<10)
    {
      i="0" + i;
    }
    return i;
  }
</script>
</body>
</html>
